﻿using GalaSoft.MvvmLight;
using Siasun.AFC.RtPlatfromGui.IBll.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Siasun.AFC.RtPlatfromGui.UI.Model
{
    /// <summary>
    /// 菜单树集合
    /// </summary>
    public class MenuTreeInfo: ViewModelBase
    {
        private string menuIconUrl;
        private string menuName;
        private string pageName;
        private bool isCanUse;
        private MenuInfo menuTag;
        private ObservableCollection<MenuTreeInfo> childrenList;

        public MenuTreeInfo()
        {
            childrenList = new ObservableCollection<MenuTreeInfo>();
        }

        /// <summary>
        /// 菜单Url地址
        /// </summary>
        public string MenuIconUrl
        {
            get
            {
                return menuIconUrl;
            }

            set
            {
                menuIconUrl = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string MenuName
        {
            get
            {
                return menuName;
            }

            set
            {
                menuName = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 菜单页面名称
        /// </summary>
        public string PageName
        {
            get
            {
                return pageName;
            }

            set
            {
                pageName = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 是否可用
        /// </summary>
        public bool IsCanUse
        {
            get
            {
                return isCanUse;
            }

            set
            {
                isCanUse = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 菜单绑定信息
        /// </summary>
        public MenuInfo MenuTag
        {
            get
            {
                return menuTag;
            }

            set
            {
                menuTag = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 菜单子集
        /// </summary>
        public ObservableCollection<MenuTreeInfo> ChildrenList
        {
            get
            {
                return childrenList;
            }

            set
            {
                childrenList = value;
                RaisePropertyChanged();
            }
        }
    }
}
